<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>登录</title>
    <link rel="stylesheet" href="/css/main.css" th:href="@{/css/main.css}" />
    <link rel="stylesheet" href="/css/my.css" th:href="@{/css/my.css}" />
    <link rel="stylesheet" href="/css/alert.css" th:href="@{/css/alert.css}"/>
    <script type="text/javascript" src="/js/adapt.js"></script>
</head>
<body>
    <div id="yu">
        <h1>登录</h1>
        <p th:if="${loginError}" class="error">账户或密码错误</p>
        <form th:action="@{/login}" method="post">
            <label for="username">用户名</label>:
            <input type="text" id="username" name="username" autofocus="autofocus" /> <br />
            <label for="password">密码</label>:
            <input type="password" id="password" name="password" /> <br />
            <h1>
                <button class="but" type="submit">Login</button>
            </h1>
        </form>
        <p><a href="/welcome" th:href="@{/welcome}">返回主菜单</a></p>
    </div>
</body>
</html>